<script>
	import {
		mapState
	} from 'vuex'
	export default {
		onLaunch: function() {
			let userInfo = uni.getStorageSync('userInfo')
			if (userInfo.token) {
				this.$store.commit('login', userInfo)
			}
			
			// uni.onTabBarMidButtonTap(e => {
			// 	uni.switchTab({
			// 		url: '/pages/company/site'
			// 	})
			// })
		},
		onShow: function() {

		},
		onHide: function() {

		}
	}
</script>

<style lang="scss">
	/*uviewcss */
	@import "uview-ui/index.scss";
	@import "static/css/index.css";
	@import "static/css/animate.min.css";

	html,
	page {
		background-color: #f5f5f5;
	}

	//radio 模拟
	.radio-moni {
		position: relative;
		display: inline-block;
		vertical-align: top;
		margin: 0 30upx 30upx 0;

		.value {
			position: relative;
			z-index: 10;
			display: inline-block;
			vertical-align: top;
			padding: 0 20upx;
			font-size: 28upx;
			color: #bbbbbb;
			line-height: 62upx;
		}

		uni-radio {
			position: absolute;
			left: 0;
			top: 0;
			right: 0;
			bottom: 0;

			.uni-radio-wrapper,
			.uni-radio-input {
				margin: 0;
				width: 100%;
				height: 100%;
				border-color: #bbbbbb;
				border-radius: 10upx;

				&:before {
					display: none;
				}
			}
		}
	}

	.radio-moni-checkd {
		.value {
			color: #fff;
		}
	}

	//按钮颜色
	.custom-style {
		margin-top: 20upx;
		background-color: $uni-bg-color !important;
	}

	.custom-style-plain {
		margin-top: 20upx;
		color: #101010 !important;
		border-color: #101010 !important;
		background-color: #fff !important;
	}
	
	.clamp {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		display: block;
	}

	//表单
	.form-box {
		margin: 30upx;
		padding: 0 30upx;
		border-radius: 20upx;
		background-color: #fff;
		
		.datatime {
			width: 100%;
		}
	}

	//底部悬浮按钮
	.fiexd-btm {
		position: absolute;
		left: 30upx;
		right: 30upx;
		bottom: 60upx;
		z-index: 250;
		font-size: 24upx;
		color: rgba(13, 133, 247, 1);
		text-align: center;
	}

	//成功图标
	.success {
		color: $uni-text-color;

		.success-icon {

			background-color: $uni-bg-color;
		}
	}

	/*行*/
	.row-box {
		.row-item {
			display: flex;
			align-items: center;
			position: relative;
			padding: 20upx 30upx;
			min-height: 100upx;
			font-size: 28upx;
			border-top: 1upx solid rgba(240, 240, 240, 1);

			&:first-child {
				border-top: 0;
			}
		}

		.row-input {
			display: flex;

			.input {
				width: 30%;
				text-align: center;
			}
		}

		.tit {
			flex-shrink: 0;
			width: 160upx;
		}

		.flex {
			flex: 1;

			.flex-sub {
				display: flex;
				justify-content: space-between;
			}
		}

		.tiv {
			margin-left: auto;
			color: #aaaaaa;
			text-align: right;
		}

		.input {
			flex: 1;
			font-size: 28upx;
		}

		textarea {
			flex: 1;
			width: auto;
			font-size: 28upx;
			line-height: 38upx;
		}
	}

	.order-info {
		position: relative;
		margin: 30upx;
		padding: 30upx;
		background-color: #fff;
		border-radius: 30upx;
		box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.16);
		
		.order-info-state {
			position: absolute;
			right: 30upx;
			top: 30upx;
			width: 120upx;
			height: 50upx;
			color: rgba(90, 120, 193, 1);
			font-size: 24upx;
			line-height: 50upx;
			text-align: center;
			border-radius: 50upx;
			border: 1upx solid rgba(90, 120, 193, 1);
		}
		
		.order-info-goto {
			display: flex;
			margin-right: 120upx;
			font-size: 24upx;
			line-height: 36upx;

			.order-info-goto-1 {
				flex: 0 0 0;

				text {
					margin: 0 20upx 0 0;
				}
			}

			.zhuang {
				padding: 0 0.25em;
				font-size: 24upx;
				color: #fff;
				background-color: #0869ff;
			}

			.xie {
				padding: 0 0.25em;
				color: #fff;
				background-color: #ff3939;
			}

			.order-info-goto-2 {
				font-weight: bold;
				font-size: 28upx;
				line-height: 36upx;
				white-space: nowrap;
				text-overflow: ellipsis;
				overflow: hidden;
				word-break: break-all;
			}
		}

		.order-info-detail {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-top: 20upx;
			font-size: 28upx;
			line-height: 40upx;
		}
		
		.order-info-center {
			width: 50%;
			text-align: center;
		}
	}

	/*行*/
	.trace-box {
		margin: 30upx;
		border-radius: 30upx;
		background-color: #fff;

		&.left {
			padding-left: 50upx;

			.trace-item:before {
				position: absolute;
				left: -20upx;
				top: 24upx;
				z-index: 10;
				width: 36upx;
				height: 36upx;
				font-size: 24upx;
				color: #fff;
				line-height: 36upx;
				text-align: center;
			}

			.after:after {
				position: absolute;
				left: -2upx;
				top: 24upx;
				width: 0;
				height: 100%;
				content: '';
				border-left: 1upx dashed #bbbbbb;
			}

			.qi:before {
				content: '起';
				background-color: #0dd9b4;
			}

			.zhan:before {
				content: '站';
				background-color: #0869ff;
			}

			.zhong:before {
				content: '终';
				background-color: #ff3939;
			}
		}

		.trace-item {
			display: flex;
			flex-wrap: wrap;
			align-items: center;
			position: relative;
			padding: 20upx 30upx;
			min-height: 100upx;
			font-size: 28upx;
			border-top: 1upx solid rgba(240, 240, 240, 1);

			&:first-child {
				border-top: 0;
			}
		}

		.tit {
			flex-shrink: 0;
			width: 160upx;
		}

		.tiv {
			margin-left: auto;
			text-align: right;
		}

		.tip {
			color: #aaaaaa;
			width: 100%;
		}

		.img image {
			margin-left: 20upx;
			width: 120upx;
			height: 120upx;
			vertical-align: top;
		}

		.icon {
			margin-left: 20upx;
		}
	}

	.red {
		color: #ff3939;
	}

	.small {
		font-size: 20upx;
	}

	.min-w {
		width: 96upx;
	}

	.full {
		width: 100%;
		height: 100%;
	}

	.round {
		margin: 20upx;
	}

	// .csssprite {
	// 	display: none;
	// }
</style>
